import HttpRequest from '@/api/request';
import ApiConfig from '@/api/api-config';

// 全宗联想
const getKeyName = option => {
    let url = ApiConfig.indexSearchUrl;
    return HttpRequest.requestJsonPost(url,option)
};

// 展示常用文档和通知
const getDownloadFile = option => {
    let url = ApiConfig.messagerDocumentUrl;
    return HttpRequest.requestJsonPost(url,option)
};

/*// 下载文档
const downloadFile = option => {
    let url = ApiConfig.indexDownLoad;
    return HttpRequest.requestBlobGet1(url,option)
};*/

// 下载文档
function downloadFile(params){
    let url = ApiConfig.downloadCommonFile;
    return HttpRequest.requestBlobGetFile(url, params)
}
function homeMap() {
    let url = ApiConfig.homeMap;
    return HttpRequest.requestJsonPost(url)
}
let Service = {
    getKeyName,
    getDownloadFile,
    downloadFile,
    homeMap
};

export default Service;